<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <jsp:include flush="true" page="_header.jsp"></jsp:include>
  <body class="bgwhite">
  	<div class="pannel">
  		 <script type="text/javascript" charset="utf-8">
		  function checkempty(){
		  	var tablename = $("#tablename");
		  	var tableFile = $("#tablefile");
		  	
		  	if(tablename.attr("value").length==0){
		  		alert("表格名称不能为空");
		  		$("#tablename").focus();
		  		return false;
		  	}else if(tableFile.attr("value").length==0){
		  		alert("表格附件不能为空");
		  		tableFile.focus();
		  		return false;
		  	}
		  	return true;
		  }
		</script>
  		<form name="frmcreatetable" enctype="multipart/form-data" id="frmcreatetable" onsubmit="return checkempty();" method="post" action="admin.do?action=tables&operation=create&tabletype=<bean:write name="talbetype" />">
  		<fieldset>
	  		<legend>添加文件</legend>
	  		<p>
	  			<label for="title">文件名称：</label>
	  		</p>
	  		<p>
	  			<input name="tablename" id="tablename" size="70" class="txt" type="text" value="" />
	  		</p>
	  		<logic:notEmpty name="typeid">
	  			<input name="typeid" type="hidden" value="<bean:write name="typeid" />" />
	  			<input name="fatherid" type="hidden" value="<bean:write name="fatherid" />" />
	  		</logic:notEmpty>
	  		<p>
	  			<label for="content">上传文件：</label>
	  		</p>
	  		<p>
	  			<input type="file" name="tablefile" id="tablefile" value="" />
	  		</p>
	  		<p>
	  			<input class="btn-submit" type="submit" value="确定" />
	  		</p>
	  	</fieldset>
	  	</form>
  	</div>
  </body>
</html>
